package com.ruoyi.ade.llm.model;

public class AdeKnowledgeIndexConfig {

    /**
     * 相似性得分
     */
    private float simScoreThreshold;
    /**
     * 相似性权重    那么相关性权重就是1-simWeight
     */
    private float simWeight;
    /**
     * 相关性得分
     */
    private float reScoreThreshold;

    /**
     * 综合得分阈值
     *   score = simScore*simWeight + reScore*(1-simWeight)
     */
    private float scoreThreshold;

    public AdeKnowledgeIndexConfig(){}

    public AdeKnowledgeIndexConfig(float simScoreThreshold, float simWeight, float reScoreThreshold, float scoreThreshold) {
        this.simScoreThreshold = simScoreThreshold;
        this.simWeight = simWeight;
        this.reScoreThreshold = reScoreThreshold;
        this.scoreThreshold = scoreThreshold;
    }

    public AdeKnowledgeIndexConfig getDefault(){
        AdeKnowledgeIndexConfig config = new AdeKnowledgeIndexConfig(0.8f,0.8f,0.2f,0.8f);
        return config;
    }

    public float getSimScoreThreshold() {
        return simScoreThreshold;
    }

    public void setSimScoreThreshold(float simScoreThreshold) {
        this.simScoreThreshold = simScoreThreshold;
    }

    public float getSimWeight() {
        return simWeight;
    }

    public void setSimWeight(float simWeight) {
        this.simWeight = simWeight;
    }

    public float getReScoreThreshold() {
        return reScoreThreshold;
    }

    public void setReScoreThreshold(float reScoreThreshold) {
        this.reScoreThreshold = reScoreThreshold;
    }

    public float getScoreThreshold() {
        return scoreThreshold;
    }

    public void setScoreThreshold(float scoreThreshold) {
        this.scoreThreshold = scoreThreshold;
    }
}
